module.exports = app => {
  const { router, controller, middleware } = app;

  //登录
  router.post('/api/login', controller.login.login)

  //注册
  router.post('/api/register', controller.login.register)

  //获取经纪人数据
  router.post('/api/broker', middleware.auth(), controller.home.broker)

  //获取经纪人详情数据
  router.post('/api/brokerList', controller.home.brokerList)

  //获取消息数据
  router.post('/api/message', middleware.auth(), controller.home.mseeage)

  //删除消息
  router.post('/api/mesDetete', controller.home.mesDetete)

  //获取二手房数据
  router.post('/api/getResoldHome', middleware.auth(), controller.home.getResoldHome)

  //获取求租/购数据
  router.post('/api/getWanted', middleware.auth(), controller.home.getWanted)

  //获取楼市圈数据
  router.post('/api/gethomeMarket', middleware.auth(), controller.home.homeMarket)

  //删除楼市圈
  router.post('/api/marketDelete', controller.home.marketDelete)

  //求租房产类型筛选
  router.post('/api/getChooseType', controller.home.chooseType)

  //求租区域筛选
  router.post('/api/getChooseAddress', controller.home.chooseAddress)

  //新房区域筛选
  router.post('/api/getnewHomeAddress', controller.home.newHomeAddress)
};
